#pragma once
#include "Missile.h"

//This class is a basic weapon system, you need to implement your own actual weapons
class WeaponSystem : public PhysicsBox 
{
private:
	int MaxAmmo;
	int CurrentAmmo;

	float Time; //Tracks the time for the missiles and other things

	float FireRate; //Time in seconds, of fire rate.
	float LastShot; //The last shot taken time.

	float ReloadTime; //The Amount of time for a reload
public:
	WeaponSystem();
	WeaponSystem(IDirect3DDevice9 *nDevice, D3DXVECTOR3 nPosition, D3DXVECTOR3 nVelocity,
				 int nMaxAmmo, float nFireRate, float nReloadTime);

	virtual ~WeaponSystem( void );

	virtual void Reload( void ) = 0;
	virtual void Fire( void ) = 0;

	virtual void Update( float dt );
	virtual void Render( void );

};

class MissilePod : public WeaponSystem
{
private:
	std::vector<BaseMissile> Missiles;
	
public:
	MissilePod();
	MissilePod(IDirect3DDevice9 *nDevice, D3DXVECTOR3 nPosition, D3DXVECTOR3 nVelocity, int MaxAmmo, float nFireRate, float nReloadTime);
	~MissilePod();

	virtual void Reload( void );
	virtual void Fire( void );


	virtual void Update( float dt );
	virtual void Render( void );
};

class MissileLauncher : WeaponSystem
{

};

class GuidedMissileLauncher : MissileLauncher
{

};